package Io;

import java.io.*;

public class CopyDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream sea = new FileInputStream("sea.png");
        FileOutputStream copysea = new FileOutputStream("sea_cp.png");
        int d;
        while ((d = sea.read())!=-1){
            copysea.write(d);
        }
        System.out.println("复制完成");
        sea.close();
        copysea.close();
    }
}
